Repository navigation
fix(id/web/markdown): fence/HTML-first blockquotes count as content for alert restore (#7563) - #8715
Conversation
…or alert restore (#7563) restore_github_alert_markers only unescapes an alert marker when it is the first content of its blockquote, but the fence-interior, HTML-interior, and fence/HTML opening-line branches never marked quote_has_content: a blockquote starting with a fenced code block or an HTML block still counted as empty when a later paragraph began, so a standalone escaped marker line there (authored literal text, with hard break) was unescaped and its hard-break backslash stripped. All four branches now mark the quote levels up to the block depth as having content (mark_quote_content). Regression tests pin the fence-first case end-to-end as a save fixpoint and the HTML-first case directly on the restore scan; both fail without the fix. All 288 web::markdown tests pass.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #7563.
PR #3740's save-side
restore_github_alert_markersunescapes a GitHub alert marker only when it is the first content of its blockquote — but the fence-interior, HTML-interior, and fence/HTML opening-line branches of the scan never markedquote_has_content. A blockquote whose first block is a fenced code block or an HTML block therefore still counted as "empty" when a later paragraph began, and a standalone escaped marker line there (authored literal text) was unescaped with its hard-break backslash stripped — silently rewriting authored text on save.All four branches now mark the quote levels up to the block's depth as having content, via a small
mark_quote_contenthelper next to the existing ancestor-marking loops.Regression tests:
two_saves);Both tests fail with the fix stashed and pass with it. Full
web::markdownsuite: 288/288 pass (cargo test --lib --features web web::markdown::), including the existing #3740 fixpoint tests — genuine alerts still restore.Queue task 14445, lane code-c.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.